// 封装banner轮播图相关代码 

import { ref } from 'vue';
import { getBanner } from '@/apis/home';
import { onMounted } from 'vue';

export function useBanner(){
    const bannerList = ref([])
    const getBannerList = async ()=>{
        const res = await getBanner()
        bannerList.value = res.result
    }
    onMounted(()=>{
        getBannerList()
    })

    return {
        bannerList
    }
}